import requests
def face_search(API_key,API_secret,image_path,faceset_token):
    """该函数为调用face++ face_search接口"""
    base_url = "https://api-cn.faceplusplus.com/facepp/v3/search"
    files = {'image_file': (image_path,open(image_path,'rb'),'multipart/form-data')}
    payload = {
        'api_key': API_key,
        'api_secret' : API_secret,
        'image_url' : image_path,
        'faceset_token' : faceset_token }
    
    r = requests.post(base_url,params = payload,files = files)
    return r.json()